package com.heima.wemedia;

import com.heima.model.admin.dtos.AdSensitiveDto;
import com.heima.model.admin.dtos.AdSensitiveListDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Franky
 * @version 1.0
 * @project heima-leadnews-shizhan
 * @description:
 * @date 2023/9/17 10:07:42
 */
@FeignClient(value = "leadnews-wemedia")
public interface ISensitiveClient {

    /**
     * 根据id删除敏感词
     * @param id
     * @return {@link ResponseResult}
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult del (@PathVariable Integer id);

    /**
     * 查询敏感词列表
     * @param sensitiveListDto
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult list(@RequestBody AdSensitiveListDto sensitiveListDto);

    /**
     * 新增敏感词
     * @param sensitiveDto
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult save(@RequestBody AdSensitiveDto sensitiveDto);

    /**
     *更新敏感词
     * @param sensitiveDto
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult update(@RequestBody AdSensitiveDto sensitiveDto);
}
